<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'estate.label', default: 'estate')}"/>
    <title>分析报告</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    .lineHeight{
        margin-left: 40px;
        display: block;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    .echartsRightBox{
        line-height: 25px;
        margin-top: 50px;
    }
    hr{
        margin-top: 20px;
        margin-bottom: 40px;
        border: 0;
        border-top: 1px solid #eee;
    }
    .buttonCollapse{
        padding: 0;
        margin: 0;margin-top: 0px;
        padding-left: 20px;
        background: #fff;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 13px;
        cursor: pointer;
        color: #62cb31;
        font-weight: bold;
        border: 1px solid #eaeaea;
        border-top: none;
        border-bottom: none;
    }
    .buttonCollapse1{
        padding:0;
        margin:0;
        background: #fff;
        padding-top: 10px;
        padding-bottom: 10px;
        border: none;
        font-size: 13px;
        color: #62cb31;
        font-weight: bold;
    }

    </style>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>分析报告</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                %{--<a href="index" class="pe-7s-back fa-2x">&nbsp;&nbsp;</a>--}%
                分析报告
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">

    <div class="row">
        <g:form method="POST" action="fullQuantityReport" class="form-horizontal" role="form">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    查询
                    <div class="panel-tools">
                        <button class="btn btn-primary btn-xs" id="searchData" type="submit"><i class="fa fa-search"></i> 查询</button>
                        <button class="btn btn-warning2 btn-xs" type="button" id="resetBtn"><i class="fa fa-times"></i> 重置</button>
                    </div>
                </div>

                <div class="panel-body seach-group" id="city">
                    <div class="row">
                        <div class="form-group col-sm-3">
                            <label for="city" class="col-sm-4 control-label">城市</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="city" id="">
                                    <option value="">郑州市</option>
                                </select>
                                %{--<g:select class="form-control" name="city" id="city" from="${com.cindata.City.executeQuery("select distinct e.city as city from  Estate e ")}" valueMessagePrefix="status" optionKey="zoneNumber" optionValue="name" value="${params?.city}" noSelection="${['': '请选择城市']}"/>--}%
                            </div>
                        </div>
                        %{--println "houseNature:"+houseNature--}%
                        %{--println "buildType:"+buildType--}%
                        <div class="form-group col-sm-3">
                            <label for="houseNature" class="col-sm-4 control-label">数据范围</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="houseNature" id="houseNature" >
                                    <option value="all">全部</option>
                                    <option value="new" <g:if test = "${houseNature == "new"}"> selected </g:if> >新楼盘数据</option>
                                    <option value="sec" <g:if test = "${houseNature == "sec"}"> selected </g:if> >二手房数据</option>
                                </select>
                                %{--<g:select class="form-control" name="city" id="cit5y" from="${com.cindata.City.executeQuery("select distinct e.city as city from  Estate e ")}" valueMessagePrefix="status" optionKey="zoneNumber" optionValue="name" value="${params?.city}" noSelection="${['': '请选择城市']}"/>--}%
                            </div>
                        </div>
                        <div class="form-group col-sm-3">
                            <label for="buildType" class="col-sm-4 control-label">房屋用途</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="buildType" id="buildType" >
                                    <option value="all">全部</option>
                                    <option value="zhuzhai" <g:if test = "${buildType == "zhuzhai"}"> selected </g:if> >住宅</option>
                                    <option value="shangye" <g:if test = "${buildType == "shangye"}"> selected </g:if> >商业</option>
                                    <option value="gongye" <g:if test = "${buildType == "gongye"}"> selected </g:if> > 工业</option>
                                    <option value="bangong" <g:if test = "${buildType == "bangong"}"> selected </g:if> >办公楼</option>
                                </select>
                                %{--<g:select class="form-control" name="city" id="ci2ty" from="${com.cindata.City.executeQuery("select distinct e.city as city from  Estate e ")}" valueMessagePrefix="status" optionKey="zoneNumber" optionValue="name" value="${params?.city}" noSelection="${['': '请选择城市']}"/>--}%
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </g:form>
    </div>

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <button class="btn  btn-warning2 btn-xs " type="button" id="toPrint"><i class="fa fa-print"></i> 打印报告</button>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>

                </div>
                押品分析
            </div>
            <div class="panel-body" style="border-bottom: none; padding-bottom: 0">
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">城市/行政区押品分布</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight"><strong> ${cityName}</strong> 押品分布在 <strong style="color: #FF0000;">${districtCounts}</strong> 个行政区，共 <strong style="color: #FF0000;">${estateCounts}</strong> 件押品，其中在 <strong style="color: #62cb31;">${districtName1}</strong> 的数量最多，有 <strong style="color: #FF0000;">${districtEstateCounts1}</strong> 件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts1/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，其次为 <strong style="color: #62cb31;">${districtName2}</strong> 和 <strong style="color: #62cb31;">${districtName3}</strong>，押品数量分别为 <strong style="color: #FF0000;">${districtEstateCounts2}</strong> 件和 <strong style="color: #FF0000;">${districtEstateCounts3}</strong> 件，分别占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts2/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong> 和 <strong style="color: #FF0000;"><g:formatNumber number="${districtEstateCounts3/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong></span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight"><strong> ${cityName} </strong> 押品分布在 <strong  style="color: #FF0000;">${districtCounts}</strong> 个行政区，共 <strong style="color: #FF0000;">${estateCounts}</strong> 件押品，其中在 <strong style="color: #62cb31;">${districtName1}</strong> 的数量最多，有 <strong style="color: #FF0000;">${districtEstateCounts1}</strong> 件，占全量押品的 <strong  style="color: #FF0000;">0.00%</strong>，其次为 <strong style="color: #62cb31;">${districtName2}</strong> 和 <strong style="color: #62cb31;">${districtName3}</strong>，押品数量分别为 <strong style="color: #FF0000;">${districtEstateCounts2}</strong> 件和 <strong style="color: #FF0000;">${districtEstateCounts3}</strong> 件，分别占全量押品的 <strong style="color: #FF0000;">0.00%</strong> 和 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>
                </div>
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">新房和二手房数量及占比</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight">全市新房押品，共 <strong style="color: #FF0000;"> ${newCount} </strong>件，在<strong style="color: #62cb31;"> ${newHouse?.name} </strong> 的数量最多，有<strong style="color: #FF0000;"> ${newHouse?.counts  } </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(newHouse?.counts ? newHouse?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong> ，二手房押品，共<strong style="color: #FF0000;"> ${secCount} </strong>件，在<strong style="color: #62cb31;"> ${secHouse?.name} </strong>的数量最多，有<strong style="color: #FF0000;"> ${secHouse?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${( secHouse?.counts ? secHouse?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong></span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight">全市新房押品，共<strong style="color: #FF0000;"> ${newCount} </strong>件，在<strong style="color: #62cb31;"> ${newHouse?.name} </strong> 的数量最多，有<strong style="color: #FF0000;"> ${newHouse?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> 0.00% </strong>，二手房押品，共<strong style="color: #FF0000;">${secCount}</strong>件，在<strong style="color: #62cb31;">${secHouse?.name}</strong>的数量最多，有<strong style="color: #FF0000;">${secHouse?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>
                </div>

                <div>
                    <h4 style="font-size: 13px; color: #62cb31;">房屋用途数量及占比</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight">全市<strong style="color: #62cb31;">住宅押品</strong>共<strong style="color: #FF0000;"> ${yongtuzhonglei[0].counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${yongtuzhonglei[0].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">商业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[2].counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${yongtuzhonglei[2].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">办公押品</strong>共 <strong style="color: #FF0000;"> ${yongtuzhonglei[1].counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${yongtuzhonglei[1].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<strong style="color: #62cb31;">工业押品</strong>共 <strong style="color: #FF0000;"> ${yongtuzhonglei[3].counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${yongtuzhonglei[3].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong></span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight">全市<strong style="color: #62cb31;">住宅押品</strong>共<strong style="color: #FF0000;"> ${yongtuzhonglei[0].counts} </strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">商业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[2].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">办公押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[1].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">工业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[3].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>
                </div>
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">贷款性质数量及占比</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight">全市<strong style="color: #62cb31;">商业贷款</strong>共<strong style="color: #FF0000;"> ${daikuanxingzhi[1]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(daikuanxingzhi[1]?.counts ? daikuanxingzhi[1]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">公积金贷款</strong>共<strong style="color: #FF0000;">  ${daikuanxingzhi[0]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(daikuanxingzhi[0]?.counts ? daikuanxingzhi[0]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">组合贷款</strong>共<strong style="color: #FF0000;"> ${daikuanxingzhi[2]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(daikuanxingzhi[2]?.counts ? daikuanxingzhi[2]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong></span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight">全市<strong style="color: #62cb31;">商业贷款</strong>共<strong style="color: #FF0000;"> ${daikuanxingzhi[1]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">公积金贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"> 0.00% </strong>，<strong style="color: #62cb31;">组合贷款</strong>共<strong style="color: #FF0000;"> ${daikuanxingzhi[2]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                    </g:else>

                </div>
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">权利种类数量及占比</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight">全市<strong style="color: #62cb31;">最高额抵押</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[3]?.counts} </strong>件，占全量押品的  <strong style="color: #FF0000;"> <g:formatNumber number="${quanlizhonglei[3].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">一般抵押</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[0]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(quanlizhonglei[0]?.counts ? quanlizhonglei[0]?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">抵押</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[2]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(quanlizhonglei[2]?.counts ? quanlizhonglei[2]?.counts : 0) /estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong>，<strong style="color: #62cb31;">典权</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[1]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> <g:formatNumber number="${(quanlizhonglei[1]?.counts ? quanlizhonglei[1]?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>% </strong></span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight">全市<strong style="color: #62cb31;">最高额抵押</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[3]?.counts} </strong>件，占全量押品的  <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">一般抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<strong style="color: #62cb31;">抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[2]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"> 0.00% </strong>，<strong style="color: #62cb31;">典权</strong>共<strong style="color: #FF0000;"> ${quanlizhonglei[1]?.counts} </strong>件，占全量押品的 <strong style="color: #FF0000;"> 0.00% </strong></span>
                    </g:else>

                </div>
                <hr style="margin-bottom: 20px;">
                %{--全量--}%
                <div class="text-left clearfix">
                    <div id="main_2" class="pull-left" style="width: 80%;height:283px;"></div>
                    %{--2222--}%
                    <div class="echartsRightBox pull-left" style="width: 17%;">
                        <h4 style="font-size: 13px;color: #62cb31;">新房和二手房数量及占比</h4>
                        <g:if test="${estateCounts != 0}">
                            <span>全市新房押品，共<strong style="color: #FF0000;">${newCount}</strong>件，在<strong style="color: #62cb31;">${newHouse?.name}</strong> 的数量最多，有<strong style="color: #FF0000;">${newHouse?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(newHouse?.counts ? newHouse?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br>二手房押品，共<strong style="color: #FF0000;">${secCount}</strong>件，在<strong style="color: #62cb31;">${secHouse?.name}</strong>的数量最多，有<strong style="color: #FF0000;">${secHouse?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${( secHouse?.counts ? secHouse?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                        </g:if>
                        <g:else>
                            <span>全市新房押品，共<strong style="color: #FF0000;">${newCount}</strong>件，在<strong style="color: #62cb31;">${newHouse?.name}</strong> 的数量最多，有<strong style="color: #FF0000;">${newHouse?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br>二手房押品，共<strong style="color: #FF0000;">${secCount}</strong>件，在<strong style="color: #62cb31;">${secHouse?.name}</strong>的数量最多，有<strong style="color: #FF0000;">${secHouse?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                        </g:else>
                    </div>

                </div>
                <hr>
                <div class="text-left clearfix">
                    <div id="main_3" class="pull-left" style="width: 80%;height:283px;"></div>
                    %{--3333--}%
                    <div  class="echartsRightBox pull-left" style="width: 17%;">
                        <h4 style="font-size: 13px; color: #62cb31;">房屋用途数量及占比</h4>
                        <g:if test="${estateCounts != 0}">
                            <span>全市<strong style="color: #62cb31;">住宅押品</strong>共<strong style="color: #FF0000;">${yongtuzhonglei[0].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${yongtuzhonglei[0].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">商业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[2].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${yongtuzhonglei[2].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">办公押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[1].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${yongtuzhonglei[1].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">工业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[3].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${yongtuzhonglei[3].counts/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                        </g:if>
                        <g:else>
                            <span>全市<strong style="color: #62cb31;">住宅押品</strong>共<strong style="color: #FF0000;">${yongtuzhonglei[0].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">商业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[2].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">办公押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[1].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">工业押品</strong>共 <strong style="color: #FF0000;">${yongtuzhonglei[3].counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                        </g:else>
                    </div>
                </div>
                <hr>
                <div class="text-left clearfix">
                    <div id="main_4" class="pull-left" style="width: 80%;height:353px; "></div>
                    %{--4444--}%
                    <div class="echartsRightBox pull-left" style="width: 17%; margin-top: 100px;">
                        <h4 style="font-size: 13px;color: #62cb31;">贷款性质数量及占比</h4>
                        <g:if test="${estateCounts != 0}">
                            <span>全市<strong style="color: #62cb31;">商业贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[1]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(daikuanxingzhi[1]?.counts ? daikuanxingzhi[1]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">公积金贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(daikuanxingzhi[0]?.counts ? daikuanxingzhi[0]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">组合贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[2]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(daikuanxingzhi[2]?.counts ? daikuanxingzhi[2]?.counts : 0 )/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                        </g:if>
                        <g:else>
                            <span>全市<strong style="color: #62cb31;">商业贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[1]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">公积金贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">组合贷款</strong>共<strong style="color: #FF0000;">${daikuanxingzhi[2]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                        </g:else>

                    </div>
                </div>
                <hr>
                <div class="text-left clearfix">
                    <div id="main_5" class="pull-left" style="width: 80%;height:283px;"></div>
                    %{--5555--}%
                    <div class="echartsRightBox pull-left" style="width: 17%;">
                        <h4 style="font-size: 13px;color: #62cb31;">权利种类数量及占比</h4>
                        <g:if test="${estateCounts != 0}">
                            <span>全市<strong style="color: #62cb31;">最高额抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[3]?.counts}</strong>件，占全量押品的  <strong style="color: #FF0000;"><g:formatNumber number="${(quanlizhonglei[3]?.counts ? quanlizhonglei[3]?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">一般抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(quanlizhonglei[0]?.counts ? quanlizhonglei[0]?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[2]?.counts}件</strong>，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(quanlizhonglei[2]?.counts ? quanlizhonglei[2]?.counts : 0) /estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>，<br><strong style="color: #62cb31;">典权</strong>共<strong style="color: #FF0000;">${quanlizhonglei[1]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${(quanlizhonglei[1]?.counts ? quanlizhonglei[1]?.counts : 0)/estateCounts*100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong></span>
                        </g:if>
                        <g:else>
                            <span>全市<strong style="color: #62cb31;">最高额抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[3]?.counts}</strong>件，占全量押品的  <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">一般抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[0]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">抵押</strong>共<strong style="color: #FF0000;">${quanlizhonglei[2]?.counts}件</strong>，占全量押品的 <strong style="color: #FF0000;">0.00%</strong>，<br><strong style="color: #62cb31;">典权</strong>共<strong style="color: #FF0000;">${quanlizhonglei[1]?.counts}</strong>件，占全量押品的 <strong style="color: #FF0000;">0.00%</strong></span>
                        </g:else>

                    </div>
                </div>
                <hr>
            </div>

            <div class="row">
                <div class="hpanel" style="">

                    <div class="col-md-12">
                        <div class="hpanel">

                            <h4 class="showhide buttonCollapse">top20小区押品数量
                                <div class="panel-tools pull-right">
                                    <a class=""><i class="fa fa-chevron-down" style="font-size: 13px; margin-right: 9px;"></i></a>
                                </div>
                            </h4>

                            <div class="panel-body" style="border:none; display: none;border-left: 1px solid #e5e5e5;border-right: 1px solid #e5e5e5;">
                                <div class="table-responsive">
                                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="esateTable">
                                        <thead>
                                        <tr>
                                            <g:sortableColumn property="city" title="城市" class="col-md-1 text-center" params="${params}"/>
                                            <g:sortableColumn property="district" title="行政区" class="col-md-1 text-center" params="${params}"/>
                                            <g:sortableColumn property="fullName" title="小区名称" class=" col-md-1 text-center" params="${params}"/>
                                            <g:sortableColumn property="counts" title="押品数量" class=" col-md-1 text-center" params="${params}"/>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <g:each in="${top20CommunityList}">
                                            <tr>
                                            <td class="text-center">${it?.city}</td>
                                            <td class="text-center">${it?.district}</td>
                                            <td class="text-center">${it?.community}</td>
                                            <td class="text-center">${it?.counts}</td>
                                        </tr>
                                        </g:each>
                                        </tbody>
                                    </table>
                                </div>

                                <div>
                                    <h4 class="buttonCollapse1"><strong>top5小区价格变动趋势</strong></h4>
                                    <div id="communityPriceTrend" style="width: 100%;height: 420px;"></div>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>



    </div>

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                贷款分析
            </div>
            <div class="panel-body">
                <div>
                    <h4 style="font-size: 13px; color: #62cb31;">押品押入期分布</h4>
                    <span class="lineHeight"><strong>${cityName}</strong> 全量押品押入期主要集中在 <strong style="color: #FF0000;"><span id="y1">年、</span></strong><strong style="color: #FF0000;"><span id="y2">年、</span></strong> <strong style="color: #FF0000;"><span id="y3">年、</span></strong>各年份放款数量如下：</span>
                    <div id="estateStart" style="width: 100%;height: 420px;"></div>
                </div>
                <hr/>
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">押品剩余还款期分布</h4>
                    <g:if test="${estateCounts != 0}">
                        <span class="lineHeight"><strong>${cityName}</strong> 按剩余还款期限统计押品数量，剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[0].remainTime}</strong> 的押品数据最多，包括 <strong style="color: #FF0000;">${remainTimeList[0].counts}</strong> 件押品，占总量押品的 <strong style="color: #FF0000;"><g:formatNumber number="${remainTimeList[0].counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>；其次是剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[1].remainTime}</strong> 年的押品，包括 <strong style="color: #FF0000;">${remainTimeList[1].counts}</strong> 件押品，占总量押品的<strong style="color: #FF0000;"><g:formatNumber number="${remainTimeList[1].counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>。</span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight"><strong>${cityName}</strong> 按剩余还款期限统计押品数量，剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[0].remainTime}</strong> 的押品数据最多，包括 <strong style="color: #FF0000;">${remainTimeList[0].counts}</strong> 件押品，占总量押品的 <strong style="color: #FF0000;">0.00%</strong>；其次是剩余还款期限在 <strong style="color: #FF0000;">${remainTimeList[1].remainTime}</strong> 年的押品，包括 <strong style="color: #FF0000;">${remainTimeList[1].counts}</strong> 件押品，占总量押品的<strong style="color: #FF0000;">0.00%</strong>。</span>
                    </g:else>
                    <div class="table-responsive">
                        <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="">
                            <thead>
                            <tr>
                                <g:sortableColumn property="city" title="剩余还款期" class="col-md-1 text-center" params="${params}"/>
                                <g:sortableColumn property="district" title="押品数量" class="col-md-1 text-center" params="${params}"/>
                                <g:sortableColumn property="counts" title="占比" class=" col-md-1 text-center" params="${params}"/>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${remainTimeList}">
                                <tr>
                                    <td class="text-center">${it?.remaintime}</td>
                                <td class="text-center">${it?.counts}</td>
                                <td class="text-center"><g:if test="${estateCounts != 0}"><g:formatNumber number="${it?.counts/estateCounts * 100}" minFractionDigits="2" maxFractionDigits="2"/></g:if><g:else>0.00</g:else>%</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>
                </div>
                <hr/>

                <hr/>
                <div>
                    <h4 style="font-size: 13px;color: #62cb31;">押品重估价值</h4>
                    <g:if test="${currentTotalPrice != 0}">
                        <span class="lineHeight"><strong>${cityName}</strong>的全量押品有有 <strong style="color: #FF0000;">${estateCounts}</strong> 件，全量押入期（评估机构评估总价）价值为 <strong style="color: #FF0000;"><g:formatNumber number="${loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿，重估期（当前系统评估总价）价值总额为 <strong style="color: #FF0000;"><g:formatNumber number="${currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿元，增幅为 <strong style="color: #FF0000;"><g:formatNumber number="${(currentTotalPrice-loanTotalPrice) / currentTotalPrice * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</strong>。</span>
                    </g:if>
                    <g:else>
                        <span class="lineHeight"><strong>${cityName}</strong> 的全量押品有 <strong style="color: #FF0000;">${estateCounts}</strong> 件，全量押入期（评估机构评估总价）价值为 <strong style="color: #FF0000;"><g:formatNumber number="${loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿，重估期（当前系统评估总价）价值总额为 <strong style="color: #FF0000;"><g:formatNumber number="${currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></strong> 亿元，增幅为 <strong style="color: #FF0000;">0.00%</strong>。</span>
                    </g:else>
                    <div class="table-responsive">
                        <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center" id="">
                            <thead>
                            <tr>
                                <g:sortableColumn property="city" title="放款年份" class="col-md-1 text-center" params="${params}"/>
                                <g:sortableColumn property="district" title="押入期总价(亿元)" class="col-md-1 text-center" params="${params}"/>
                                <g:sortableColumn property="fullName" title="重估期总价(亿元)" class=" col-md-1 text-center" params="${params}"/>
                                <g:sortableColumn property="counts" title="增幅" class=" col-md-1 text-center" params="${params}"/>
                            </tr>
                            </thead>
                            <tbody>
                            <g:each in="${evaluateList}">
                                <tr>
                                    <td class="text-center">${it?.startDate}</td>
                                <td class="text-center"><g:formatNumber number="${it?.loanTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></td>
                                <td class="text-center"><g:formatNumber number="${it?.currentTotalPrice}" minFractionDigits="2" maxFractionDigits="2"/></td>
                                <td class="text-center"><g:formatNumber number="${it?.amplitude * 100}" minFractionDigits="2" maxFractionDigits="2"/>%</td>
                                </td>
                            </tr>
                            </g:each>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>

<asset:javascript src="echarts/echarts-all-3.js" />
<asset:javascript src="main/fullQuantityReport.js" />
%{--新房二手房--}%
<script type="text/javascript">


    // 基于准备好的dom，初始化echarts实例
    var myChart2 = echarts.init(document.getElementById('main_2'));

    // 指定图表的配置项和数据
    var option2 = {
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['新房','二手房'],
            textStyle: {
                color: '#ADADAD'
            }

        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
        },
        yAxis: [{
            type: 'value',
            scale: true,
            name: '押品数量（个）',
            boundaryGap: false,
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
//boundaryGap: ['20%', '20%'] // 坐标轴两边留白策略，类目轴和非类目轴的设置和表现不一样。
        }
        ],
        series: [{
            name: '新房',
            type: 'line'
        }, {
            name: '二手房',
            type: 'line'
        }]
    };
    var tt2 = "${districtX}".split(",")
    var a2 = [];
    $.each(tt2,function(){
        a2.push(this.toString())
    })
    option2.xAxis.data = a2
    option2.series[0].data = [${xinfangxianData}]
    option2.series[1].data = [${ershoufangxianData}]

    myChart2.setOption(option2);
</script>
%{--房屋用途--}%
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart3 = echarts.init(document.getElementById('main_3'));
    var option3 = {
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['住宅', '商业','办公','工业'],
            textStyle: {
                color: '#ADADAD'
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: true,
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
        },
        yAxis: {
            type: 'value',
            scale: true,
            name: '押品数量（个）',
            boundaryGap: false,
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
        },
        series: [
            {
                name: '住宅',
                type: 'line'
            },
            {
                name: '商业',
                type: 'line'
            },
            {
                name: '办公',
                type: 'line'
            },
            {
                name: '工业',
                type: 'line'
            },
        ]
    };
    var tt3 = "${districtX}".split(",")
    var a3 = [];
    $.each(tt3,function(){
        a3.push(this.toString())
    })
    option3.xAxis.data = a3
    option3.series[0].data = [${zhuzhaiData}]
    option3.series[1].data = [${shangyeData}]
    option3.series[2].data = [${bangongData}]
    option3.series[3].data = [${gongyeData}]

    myChart3.setOption(option3);
</script>
%{--贷款性质面积--}%
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart4 = echarts.init(document.getElementById('main_4'));
    var option4 = {
        tooltip : {
            trigger: 'item',
            formatter: "{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'horizontal',
            left: 'center',
//            top: '60px',
            data: ['商业贷款','公积金贷款','组合贷款'],
            textStyle: {
                color: '#ADADAD'
            }
        },

        series : [
            {
                name: '访问来源',
                type: 'pie',
                radius : '60%',
                center: ['50%', '50%'],
                data:[
                    {value:${(daikuanxingzhi[1]?.counts ? daikuanxingzhi[1]?.counts : 0)}, name:'商业贷款',label:{show:false},labelLine:{show:false}},
                    {value:${(daikuanxingzhi[0]?.counts ? daikuanxingzhi[0]?.counts : 0)}, name:'公积金贷款',label:{show:false},labelLine:{show:false}},
                    {value:${(daikuanxingzhi[2]?.counts ? daikuanxingzhi[2]?.counts : 0)}, name:'组合贷款',label:{show:false},labelLine:{show:false}}
                ],
                itemStyle: {
                    emphasis: {
                        label:{show:false},labelLine:{show:false},
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };


    myChart4.setOption(option4);
</script>
%{--权利种类数量--}%
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart5 = echarts.init(document.getElementById('main_5'));

    // 指定图表的配置项和数据
    var option5 = {
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['最高额抵押','一般抵押','抵押','典权'],
            textStyle: {
                color: '#ADADAD'
            }
        },
        toolbox: {
            show: false,
            feature: {
                dataView: {
                    readOnly: false
                },
                restore: {},
                saveAsImage: {}
            }
        },
        dataZoom: {
            show: false,
            start: 0,
            end: 100
        },
        xAxis: [{
            type: 'category',
            boundaryGap: true,
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
        }],
        yAxis: [{
            type: 'value',
            scale: true,
            name: '押品数量（个）',
            axisLine:{
                lineStyle:{
                    color:'#ADADAD',
                }
            },
            boundaryGap: false
// 坐标轴两边留白策略，类目轴和非类目轴的设置和表现不一样。boundaryGap: ['20%', '20%']
        }
        ],
        series: [{
            name: '最高额抵押',
            type: 'line'
        },
         {
                name: '一般抵押',
                type: 'line'
          },
            {
                name: '抵押',
                type: 'line'
            },
            {
                name: '典权',
                type: 'line'
            }]
    };
    var ttt = "${recentData}".split(",")
    var dateArr = []
    $.each(ttt,function(){
        dateArr.push(this.toString())
    })
        option5.series[0].data = [${zuigaoedata}]
        option5.series[1].data = [${yibandata}]
        option5.series[2].data = [${diyadata}]
        option5.series[3].data = [${dianquandata}]
        option5.xAxis[0].data = dateArr

        myChart5.setOption(option5);
</script>


<g:javascript>
    
    $("#s2id_city span:first").html('${cityName}');
    $("#city").val('${zoneNumber}');

    //重置按钮
    $("#resetBtn").click(function () {
        $("#s2id_city span:first").html("请选择城市");
        $("#city").val("");
    })

    $("#toPrint").click(function(){
       var city =  $("#city").val();
       var houseNature  =$("#houseNature").val();
       var buildType = $("#buildType").val();
        //window.open("/analyze/reportPrinting?city="+city)
        window.open("/analyze/fullQuantityReport?houseNature="+houseNature+"&buildType="+buildType+"&gtype=999",'addFileWindow','toolbar=no,location=no,resizable=no, height=768, width=1000,,scrollbars=yes ,left=380,top=100');

    })

</g:javascript>

</body>
</html>
